using System;
using System.Windows.Forms;
using CSW.Framework.Common.Binding.ValueTypes;

namespace CSW.Framework.UI.Binding
{
    /// <summary>
    /// An interface for wrapping error provider controls.
    /// </summary>
    public interface IErrorWrapper
    {
        /// <summary>
        /// Sets the error of a control.
        /// </summary>
        /// <param name="control">The control.</param>
        /// <param name="text">The error text.</param>
        /// <param name="errorType">The type of error.</param>
        void SetError(Control control, string text, ErrorType errorType);

        /// <summary>
        /// Clears the error of a control.
        /// </summary>
        /// <param name="control">The control.</param>
        void ClearError(Control control);
    }
}